import { provide ,plugin} from 'midway';
import { IChatService, IUserResult } from '../interface';

@provide('chatService')
export class ChatService implements IChatService{
    @plugin()
    knex;
    async getChat(options: IUserResult){
        await this.knex.insert({accountid:options.accountid, oppositeid:options.oppositeid,information:options.information,addtime:new Date}).into('message')
    }
}